package com.team.engine.user.dao;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.team.engine.basedao.BaseEntity;

/**
 * 用户详细，表实体
 * @author MengLH
 * @data 2010-8-4
 */
@Entity
@Table(name="user_details")
public class UserDetails extends BaseEntity {

	/**
	 * 用户Id
	 */
	@Id
	@Column(name="user_id", unique=true)
	private String userId;
	
	/**
	 * 真实姓名
	 */
	@Column
	private String surname;
	
	/**
	 * 性别
	 */
	@Column
	private Integer sex;
	
	/**
	 * 上次登录时间
	 */
	@Column(name="last_login_time")
	@Temporal(TemporalType.TIMESTAMP)
	private Date lastLoginTime;
	
	/**
	 * 上次离开时所在的页面
	 */
	@Column(name="last_logout_page")
	private String lastLogoutPage;
	
	@OneToOne
	@PrimaryKeyJoinColumn
	private UserNav userNav;

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getSurname() {
		return surname;
	}

	public void setSurname(String surname) {
		this.surname = surname;
	}

	public Integer getSex() {
		return sex;
	}

	public void setSex(Integer sex) {
		this.sex = sex;
	}

	public Date getLastLoginTime() {
		return lastLoginTime;
	}

	public void setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

	public String getLastLogoutPage() {
		return lastLogoutPage;
	}

	public void setLastLogoutPage(String lastLogoutPage) {
		this.lastLogoutPage = lastLogoutPage;
	}

	public UserNav getUserNav() {
		return userNav;
	}

	public void setUserNav(UserNav userNav) {
		this.userNav = userNav;
	}
	
}
